package com.ljx.offer;

/**
 * @author 李捷禧
 * Date: 2023/3/12
 * ClassName: C10_11
 */

public class C10_11 {
    public int numWays(int n) {
        int mod = 1000000007;
        if(n<=1) return 1;
        int[] arr = new int[n+1];
        arr[0] = arr[1] = 1;
        for (int i = 2; i <= n; i++) {
            arr[i] = (arr[i-1] + arr[i-2]) % mod;
        }
        return arr[n];
    }

    public static void main(String[] args) {
        System.out.println(new C10_11().numWays(7));
    }


}